package com.ymatou.iapi.couponmanage.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.couponmanage.parameter.executeTaskBean;
import com.ymatou.iapi.couponmanage.service.executeTaskCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
/**
*消息生总执行子任务(生成优惠(套)券，生成兑换码)
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_executeTask{
	private static executeTaskBean executetaskBean;
	private static executeTaskCall executetaskCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("消息生总执行子任务(生成优惠(套)券，生成兑换码)");
	}

	@Before
	public void caseUp() {
		executetaskBean=new executeTaskBean();
		executetaskCall=new executeTaskCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(executetaskCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_executeTask_001() {
		Logger.start(true,"消息生总执行子任务(生成优惠(套)券，生成兑换码)");
		try {
			//TODO 补全case代码
			executetaskBean.setSubTaskId(200015);
			executetaskCall.setData(executetaskBean);
			executetaskCall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}